package com.hardson.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hardson.demo.mapper.UserMapper;
import com.hardson.demo.model.user.User;
import com.hardson.demo.service.UserService;

@Controller
public class LoginController extends BaseController {
	
	
	@Autowired
	UserService userService;
	
	@RequestMapping("/hello")
    @ResponseBody
    String index() {
		
		User user = userService.getUser(1l, UserMapper.class);
        return "Hello " + user.getName() + " !";
    }
	
}
